#pragma once

#include "Core/Window.h"
#include "Core/GraphicsContext.h"

class WindowsWindow : public Window
{
public:
	WindowsWindow(const WindowProps& props);

	~WindowsWindow();

	virtual void Init(const WindowProps& props) override;

	virtual void OnUpdate() override;

	virtual void Shutdown() override;

	virtual void SetVSync(bool enabled) override;

	virtual inline unsigned int GetWidth() const override { return m_Data.Width; };
	virtual inline unsigned int GetHeight() const override { return m_Data.Height; };

	virtual void SetEventCallback(const EventCallbackFn& callback) override { m_Data.EventCallback = callback; };
	virtual void SetMouseCallback(const MouseCallbackFn& callback) override { m_Data.MouseCallback = callback; };

	virtual inline void* GetWindow() override { return m_Window; };
private:

	struct WindowData
	{
		std::string Title;
		unsigned int Width, Height;

		EventCallbackFn EventCallback;
		MouseCallbackFn MouseCallback;
	};

	class GLFWwindow* m_Window;
	GraphicsContext* m_Context;

	WindowData m_Data;
};
